public class Test {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree = new TestBinaryTree();
        TestBinaryTree.TreeNode root = testBinaryTree.createTree();

        testBinaryTree.preOrder(root);
        System.out.println();

        testBinaryTree.inOrder(root);
        System.out.println();

        testBinaryTree.postOrder(root);
        System.out.println();

        testBinaryTree.size(root);
        System.out.println("节点个数："+TestBinaryTree.nodeSize);

        System.out.println("叶子节点个数："+testBinaryTree.getLeafNodeCount1(root));
        System.out.println("叶子节点个数："+testBinaryTree.getLeafNodeCount2(root));

        System.out.println("第k层的节点个数："+testBinaryTree.getKLevelNodeCount(root,2));

        System.out.println("树的高度："+testBinaryTree.getHeight(root));

        System.out.println("树的层次遍历：");
        testBinaryTree.levelOrder(root);
    }
}
